﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="articleSelect.aspx.cs"
    Inherits="CMS.admin.articleSelect" %>

<%@ Register Assembly="ComponentArt.Web.UI" Namespace="ComponentArt.Web.UI" TagPrefix="ComponentArt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Chọn tin liên quan</title>
    <link href="../css/rounded.css" rel="stylesheet" type="text/css" />
    <link href="../css/login.css" rel="stylesheet" type="text/css" />
    <link href="../css/navStyle.css" rel="stylesheet" type="text/css" />
    <link href="../css/gridStyle.css" rel="stylesheet" type="text/css" />
    <link href="../css/treeStyle.css" rel="stylesheet" type="text/css" />
    <link href="../css/toolbox.css" rel="stylesheet" type="text/css" />
    <link href="../css/calendarStyle.css" rel="stylesheet" type="text/css" />
    <link href="../../view/css/nyroModal.css" type="text/css" rel="stylesheet" />
    <link href="../css/treeStyle.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript">
        function TreeView1_onNodeSelect(sender, eventArgs)
          {
            cboCategory.set_text(eventArgs.get_node().get_text());
            //cboParentCate.set_DataValueField(eventArgs.get_node().get_value());
           document.getElementById('<%=hfSelect.ClientID %>').value=eventArgs.get_node().get_value();
            cboCategory.collapse();
            
          }
         
    </script>

</head>
<body>
    <form id="frmPost" method="post" action='' runat="Server">
        <div style="border: solid 1px #ccc;">
            <div id="toolbox">
                <div class="header" style="float: left; margin-left: -40px;">
                    <img src="../images/Toolbox/icon-48-article-add.png" alt="" id="imgHeader" />
                    Quản lý tin tức: danh sách
                </div>
                <div style="float: right;">
                    <table class="toolbar">
                        <tr>
                            <td align="center">
                                <asp:LinkButton ID="btnSelect" runat="server" OnClick="btnSelect_Click">
                                    <asp:Label ID="lblAction" CssClass="Icon-32-Add" runat="server" />
                                    Lựa chọn tin
                                </asp:LinkButton>
                            </td>
                            <td align="center">
                            <asp:LinkButton ID="btnClose" CausesValidation="false" runat="server" OnClientClick="javascript:self.close();">
                                <asp:Label ID="Label4" CssClass="Icon-32-Cancel" runat="server" />
                                Đóng lại
                            </asp:LinkButton>
                        </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <p align="center">
            <br />
            <asp:Label ID="lblMessage" runat="server" BackColor="White" BorderColor="White" ForeColor="Red"></asp:Label>
            <asp:HiddenField ID="hfSelect" runat="Server" />
        </p>
       <%-- <div id="content-box">
            <div class="t">
                <div class="t">
                    <div class="t">
                    </div>
                </div>
            </div> <div class="m">--%>
            
                <table cellpadding="1" cellspacing="1" width="740px">
                    <tr>
                        <td align="left">
                            <strong>Chuyên mục:</strong>
                        </td>
                        <td style="text-align: left">
                            <ComponentArt:ComboBox ID="cboCategory" runat="server" KeyboardEnabled="false" AutoFilter="false"
                            AutoHighlight="false" AutoComplete="false" CssClass="comboBox" HoverCssClass="comboBoxHover"
                            FocusedCssClass="comboBoxHover" TextBoxCssClass="comboTextBox" DropDownCssClass="comboDropDown"
                            ItemCssClass="comboItem" ItemHoverCssClass="comboItemHover" SelectedItemCssClass="comboItemHover"
                            DropHoverImageUrl="../images/drop_hover.gif" DropImageUrl="../images/drop.gif"
                            Width="360" DropDownHeight="400" DropDownWidth="360">
                            <DropDownContent>
                                <ComponentArt:TreeView ID="TreeView1" DragAndDropEnabled="false" NodeEditingEnabled="false"
                                    KeyboardEnabled="true" CssClass="TreeView" NodeCssClass="TreeNode" SelectedNodeCssClass="SelectedTreeNode"
                                    HoverNodeCssClass="HoverTreeNode" NodeEditCssClass="NodeEdit" LineImageWidth="19"
                                    LineImageHeight="20" DefaultImageWidth="16" DefaultImageHeight="16" ItemSpacing="0"
                                    NodeLabelPadding="3" LineImagesFolderUrl="../images/lines/" Height="400" Width="360" 
                                    ShowLines="true" EnableViewState="true" runat="server">
                                    <ClientEvents>
                                        <NodeSelect EventHandler="TreeView1_onNodeSelect" />
                                    </ClientEvents>
                                </ComponentArt:TreeView>
                            </DropDownContent>
                            <DropDownFooter>
                            </DropDownFooter>
                        </ComponentArt:ComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Tiêu đề:</strong>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtTitle" runat="Server" Width="360px"></asp:TextBox>
                            &nbsp; &nbsp; &nbsp;
                            <asp:ImageButton ID="ImgSearch" ImageUrl="../images/btnSearch.jpg" runat="server"
                                OnClick="ImgSearch_Click" />
                        </td>
                    </tr>
                </table>
                <br />
                <asp:Label ID="lblGrid" runat="server" BackColor="White" BorderColor="White" ForeColor="Red"></asp:Label>
                <br />
                <table cellpadding="1" cellspacing="1" width="740px">
                    <tr>
                        <td>
                            <ComponentArt:Grid ID="Grd1" EnableViewState="true" AllowEditing="true" EditOnClickSelectedItem="false"
                                ShowHeader="False" CssClass="Grid" KeyboardEnabled="false" FooterCssClass="GridFooter"
                                RunningMode="Callback" AutoCallBackOnDelete="true" AllowHtmlContent="true" PagerStyle="Numbered"
                                ManualPaging="true" PagerTextCssClass="PagerText" PageSize="20" ImagesBaseUrl="../images/"
                                LoadingPanelClientTemplateId="LoadingFeedbackTemplate" Width="700" LoadingPanelPosition="MiddleCenter"
                                runat="server">
                                <Levels>
                                    <ComponentArt:GridLevel RowCssClass="Row" AlternatingRowCssClass="AlternatingRow"
                                        DataCellCssClass="DataCell" HeadingCellCssClass="HeadingCell" HeadingTextCssClass="HeadingCellText"
                                        SortAscendingImageUrl="asc.gif" SortDescendingImageUrl="desc.gif" SortImageWidth="9"
                                        SortImageHeight="5">
                                        <Columns>
                                            <ComponentArt:GridColumn Align="Center" DataCellClientTemplateId="chkTemplate" DataField="articleId"
                                                HeadingText="<img src='../images/selected.gif' border='0' />" Width="40" AllowSorting="false" />
                                            <ComponentArt:GridColumn DataField="title" HeadingText="Tiêu đề" Width="200" TextWrap="true"/>
                                            <%--<ComponentArt:GridColumn DataField="description" HeadingText="Mô tả" Width="300" />--%>
                                            <ComponentArt:GridColumn DataField="createDate" HeadingText="Ngày tạo" Width="70"
                                                DataType="System.DateTime" FormatString="dd/MM/yyyy" />
                                        </Columns>
                                    </ComponentArt:GridLevel>
                                </Levels>
                                <ClientTemplates>
                                    <ComponentArt:ClientTemplate ID="chkTemplate" runat="server">
                                        <table width="100%" cellspacing="0" cellpadding="0" border="0">
                                            <tr>
                                                <td align="center" style="padding-left: 0px;">
                                                    <input type="checkbox" class="checkbox" value="## DataItem.GetMember('articleId').Value ##"
                                                        name="articleId" id="articleId" />
                                                </td>
                                            </tr>
                                        </table>
                                    </ComponentArt:ClientTemplate>
                                    <ComponentArt:ClientTemplate ID="LoadingFeedbackTemplate" runat="server">
                                        <table cellspacing="0" cellpadding="0" border="0">
                                            <tr>
                                                <td style="font-size: 10px;">
                                                    Đang tải...&nbsp;</td>
                                                <td>
                                                    <img src="../images/spinner.gif" border="0" />
                                                </td>
                                            </tr>
                                        </table>
                                    </ComponentArt:ClientTemplate>
                                </ClientTemplates>
                            </ComponentArt:Grid>
                        </td>
                    </tr>
                </table>
                <%--<div class="clr">
                </div>
            </div>--%>
            <%--<div class="b">
                <div class="b">
                    <div class="b">
                    </div>
                </div>
            </div>
        </div>--%>
    </form>
</body>
</html>
